<!DOCTYPE html><html lang="en"><head><title>天猫超市</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"><link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/minireset.css/0.0.2/minireset.css"><link rel="stylesheet" href="https://at.alicdn.com/t/font_1534407_wok1jkjgio.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css"><script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script><script src="https://cdn.staticfile.org/vue/2.6.10/vue.min.js"></script><script src="https://cdn.jsdelivr.net/npm/vant@2.12/lib/vant.min.js"></script></head><body><style>* {
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  margin: 0;
}
body,
html {
  background: #518c39;
  padding: 0;
  margin: 0;
}
.root-rem-calc,
html {
  font-size: calc(100vw / 750 * 100);
}
@media only screen and (min-width: 540px) {
  .root-rem-calc,
  html {
    font-size: 72px;
  }
}
.max-width {
  max-width: 7.5rem;
  margin: auto;
}
.ellipsis-single {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ellipsis-multiple {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  white-space: normal;
  text-overflow: ellipsis;
  overflow: hidden;
}
[v-cloak] {
  display: none;
}
.banner-wrapper {
  display: block;
  width: 7.5rem;
  min-height: 3.4rem;
}
.page-container {
  min-height: 100vh;
  max-width: 7.5rem;
  background: #518c39;
  padding-bottom: 1.76rem;
  margin: 0 auto;
  box-sizing: border-box;
}
.layui-layer {
  font-size: 12px;
}
@-webkit-keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    transform: scaleY(1);
  }
}
@-moz-keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    -moz-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    -moz-transform: scaleY(1);
    transform: scaleY(1);
  }
}
@-o-keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    -o-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    -o-transform: scaleY(1);
    transform: scaleY(1);
  }
}
.free-loading {
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-direction: column;
  flex-direction: column;
  padding: 0.6rem 0;
}
.free-loading > p {
  font-size: 0.3rem;
  color: #fff;
  letter-spacing: 0.01rem;
  margin: 0.2rem 0 0;
}
.free-loading .la-line-scale {
  width: 1.6rem;
  height: 1.28rem;
  display: block;
  font-size: 0;
  color: #518c39;
}
.free-loading .la-line-scale > div {
  display: inline-block;
  float: none;
  background-color: currentColor;
  border: 0 solid;
  width: 0.16rem;
  height: 1.28rem;
  margin: 0 0.08rem;
  border-radius: 0;
  -webkit-animation: line-scale 1.2s ease infinite;
  -moz-animation: line-scale 1.2s infinite ease;
  -o-animation: line-scale 1.2s infinite ease;
  animation: line-scale 1.2s ease infinite;
}
.free-loading .la-line-scale > div:first-child {
  -webkit-animation-delay: -1.2s;
  -moz-animation-delay: -1.2s;
  -o-animation-delay: -1.2s;
  animation-delay: -1.2s;
}
.free-loading .la-line-scale > div:nth-child(2) {
  -webkit-animation-delay: -1.1s;
  -moz-animation-delay: -1.1s;
  -o-animation-delay: -1.1s;
  animation-delay: -1.1s;
}
.free-loading .la-line-scale > div:nth-child(3) {
  -webkit-animation-delay: -1s;
  -moz-animation-delay: -1s;
  -o-animation-delay: -1s;
  animation-delay: -1s;
}
.free-loading .la-line-scale > div:nth-child(4) {
  -webkit-animation-delay: -0.9s;
  -moz-animation-delay: -0.9s;
  -o-animation-delay: -0.9s;
  animation-delay: -0.9s;
}
.free-loading .la-line-scale > div:nth-child(5) {
  -webkit-animation-delay: -0.8s;
  -moz-animation-delay: -0.8s;
  -o-animation-delay: -0.8s;
  animation-delay: -0.8s;
}
@-moz-keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    -moz-transform: scaleY(0.4);
    -o-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    -moz-transform: scaleY(1);
    -o-transform: scaleY(1);
    transform: scaleY(1);
  }
}
@-webkit-keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    -moz-transform: scaleY(0.4);
    -o-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    -moz-transform: scaleY(1);
    -o-transform: scaleY(1);
    transform: scaleY(1);
  }
}
@-o-keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    -moz-transform: scaleY(0.4);
    -o-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    -moz-transform: scaleY(1);
    -o-transform: scaleY(1);
    transform: scaleY(1);
  }
}
@keyframes line-scale {
  0%, 40%, to {
    -webkit-transform: scaleY(0.4);
    -moz-transform: scaleY(0.4);
    -o-transform: scaleY(0.4);
    transform: scaleY(0.4);
  }
  20% {
    -webkit-transform: scaleY(1);
    -moz-transform: scaleY(1);
    -o-transform: scaleY(1);
    transform: scaleY(1);
  }
}
.page-container {
  font-family: PingFang SC;
}
.page-container .banner-wrapper {
  height: 3.5rem;
}
.page-container .strategy {
  margin-top: 0.2rem;
  cursor: pointer;
  padding: 0 0.2rem;
}
.page-container .strategy img {
  display: block;
}
.page-container .item-card {
  position: relative;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0.2rem;
  margin-bottom: 0.2rem;
  border-radius: 0.2rem;
  box-sizing: border-box;
  user-select: none;
}
.page-container .item-card .card-left {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.1rem;
  border: 1px solid rgba(0,0,0,0.05);
}
.page-container .item-card .card-left > img {
  width: 100%;
  height: 100%;
  border-radius: 0.1rem;
}
.page-container .item-card .card-right {
  flex: 1;
  overflow: hidden;
  padding-left: 0.28rem;
  font-size: 0;
}
.page-container .item-card .card-right .row-2 {
  margin-left: -0.2rem;
  padding: 0.2rem;
  background: linear-gradient(90deg, #fff7f2, #fff);
}
.page-container .item-card .card-right .desc-with-sales {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.12rem 0 0.2rem;
}
.page-container .item-card .card-right .desc-with-sales .today-sale {
  font-size: 0.2rem;
  font-family: PingFang SC;
  font-weight: 400;
  color: #999;
}
.page-container .item-card .card-right .icon {
  user-select: none;
  height: 0.26rem;
  width: auto;
  margin-right: 2px;
}
.page-container .item-card .card-right .title {
  display: flex;
  align-items: center;
  font-size: 0.26rem;
  font-weight: 500;
  color: #000;
  margin: 0;
}
.page-container .item-card .card-right .title span {
  flex: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.page-container .item-card .card-right .desc {
  display: flex;
  align-items: center;
  height: 0.38rem;
  padding: 0 0.14rem;
  background: linear-gradient(90deg, rgba(236,29,65,0.1) 0%, rgba(255,255,255,0) 130%);
  font-size: 0.2rem;
  font-weight: 500;
  color: #ec1d41;
  line-height: 0.38rem;
  text-align: left;
  border: 1px solid #ffeadb;
  border-radius: 0.04rem;
}
.page-container .item-card .card-right .desc .iconfont {
  font-size: 0.26rem;
  margin-right: 0.05rem;
}
.page-container .item-card .card-right .price {
  font-size: 0.2rem;
  font-weight: 500;
  color: #ec1d41;
}
.page-container .item-card .card-right .price strong {
  font-size: 0.36rem;
  line-height: 1em;
}
.page-container .item-card .card-right .price .origin-price {
  font-family: PingFang SC;
  font-weight: 400;
  text-decoration: line-through;
  color: #999;
}
.page-container .item-card .card-right .coupon-row {
  margin-top: 0.16rem;
}
.page-container .item-card .card-right .coupon-row .coupon {
  display: flex;
  align-items: center;
  text-align: center;
  height: 0.32rem;
  font-size: 0.2rem;
  font-weight: 500;
  color: #ec1d41;
}
.page-container .item-card .card-right .coupon-row .coupon > span {
  display: flex;
  align-items: center;
  padding: 0 0.06rem;
  height: 100%;
}
.page-container .item-card .card-right .coupon-row .coupon .name {
  color: #fff;
  background: linear-gradient(0deg, #fd4741, #ff9e47);
  border-radius: 0.04rem 0 0 0.04rem;
}
.page-container .item-card .card-right .coupon-row .coupon .value {
  border: 1px dashed #ff9e47;
  border-left: 0;
  border-radius: 0 0.04rem 0.04rem 0;
  color: #f1551f;
}
.page-container .item-card .btn-block .btn {
  position: absolute;
  right: 0;
  width: 1.3rem;
  height: 0.56rem;
  line-height: 0.56rem;
  border-radius: 0.28rem 0 0 0.28rem;
  font-size: 0.24rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.page-container .item-card .btn-block .get-coupon {
  top: 1.04rem;
  background: #fff3f5;
  border: 1px dashed #f55c77;
  border-right: none;
  color: #ec1d41;
}
.page-container .item-card .btn-block .to-order {
  bottom: 0.2rem;
  background: linear-gradient(-90deg, #fe3a3f 0%, #faa450 100%);
  box-shadow: 0 0.05rem 0.1rem 0 rgba(215,21,55,0.2);
  color: #fffefd;
}
.page-container .item-card-1-yuan {
  display: inline-block;
  vertical-align: top;
  width: 3.5rem;
  height: 5rem;
  background: #fff;
  border-radius: 0.08rem;
}
.page-container .item-card-1-yuan:nth-child(odd) {
  margin-right: 0.2rem;
  margin-bottom: 0.2rem;
}
.page-container .item-card-1-yuan .img-box {
  width: 100%;
  height: 3.5rem;
  border-radius: 0.08rem 0.08rem 0 0;
  overflow: hidden;
}
.page-container .item-card-1-yuan .text-block {
  padding-left: 0.14rem;
}
.page-container .item-card-1-yuan .title {
  margin: 1em 0 0.2rem;
  font-size: 0.26rem;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333;
}
.page-container .item-card-1-yuan .bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-container .item-card-1-yuan .bottom .price {
  font-size: 0.2rem;
  font-weight: 500;
  color: #ec1d41;
}
.page-container .item-card-1-yuan .bottom .price strong {
  font-size: 0.36rem;
  line-height: 1em;
}
.page-container .item-card-1-yuan .bottom .btn {
  width: 1.3rem;
  height: 0.56rem;
  line-height: 0.56rem;
  border-radius: 0.28rem 0 0 0.28rem;
  font-size: 0.24rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.page-container .item-card-1-yuan .bottom .to-order {
  background: linear-gradient(-90deg, #fe3a3f 0%, #faa450 100%);
  box-shadow: 0 0.05rem 0.1rem 0 rgba(215,21,55,0.2);
  color: #fffefd;
}
.page-container .fixed-nav {
  z-index: 100;
  width: 7.5rem;
  height: 0.9rem;
  margin: auto;
  box-sizing: border-box;
  transform: translateZ(0);
  background: #518c39;
}
.page-container .fixed-nav.fixed {
  position: fixed;
  top: -2px;
}
.page-container .fixed-nav.fixed + .page-content {
  margin-top: 0.9rem;
}
.page-container .fixed-nav.fixed .active-bg {
  visibility: hidden;
}
.page-container .fixed-nav .nav-list {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.page-container .fixed-nav .nav-list .active-bg {
  position: absolute;
  z-index: 0;
  top: 0.22rem;
  height: 0.5rem;
  border-radius: 0.1rem;
  transition: left 0.25s;
}
.page-container .fixed-nav .nav-list .active-bg:after {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -0.1rem;
  border: 0.1rem solid rgba(0,0,0,0);
  border-bottom-color: #6cab52;
  content: "";
}
.page-container .fixed-nav .nav-list .nav-item {
  position: relative;
  z-index: 1;
  flex: 1;
  font-size: 0.26rem;
  font-weight: bold;
  text-align: center;
  color: #acd676;
  cursor: pointer;
  user-select: none;
}
.page-container .fixed-nav .nav-list .nav-item .arrow-icon {
  display: inline-block;
  position: relative;
  width: 0.18rem;
  height: 0.18rem;
  margin-left: 0.1rem;
  transition: transform 0.2s linear;
}
.page-container .fixed-nav .nav-list .nav-item .arrow-icon.up {
  transform: rotate(180deg);
}
.page-container .fixed-nav .nav-list .nav-item .arrow-icon:after {
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  position: absolute;
  border: 0.06rem solid rgba(0,0,0,0);
  border-top-color: currentColor;
  transform: translate(-50%, -0.03rem);
  content: '';
}
.page-container .fixed-nav .nav-list .nav-item.active {
  color: #fff;
  cursor: default;
}
.page-container .free-lists {
  padding: 0.2rem 0.15rem 0;
}
.page-container .free-loading .la-line-scale {
  color: #fff;
}
.page-container .page-content {
  border-radius: 0.16rem;
  background: #6cab52;
}
.page-container .second-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.7rem;
  border-bottom: 1px solid rgba(81,140,57,0.5);
}
.page-container .second-nav li {
  flex: 1;
  position: relative;
  font-size: 0.26rem;
  font-family: PingFang SC;
  font-weight: 500;
  color: #acd676;
  text-align: center;
  cursor: pointer;
}
.page-container .second-nav li .iconfont {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.16rem;
  margin-left: 1em;
  transition: transform 0.25s;
}
.page-container .second-nav li .iconfont.up {
  transform: rotate(180deg);
}
.page-container .second-nav li .all-icon {
  position: relative;
  display: inline-block;
  margin-left: 0.5em;
  width: 0.22rem;
}
.page-container .second-nav li.active {
  color: #fff;
}
.page-container .second-nav li:after {
  position: absolute;
  right: 0;
  top: 50%;
  display: block;
  height: 0.28rem;
  width: 1px;
  transform: translateY(-50%);
  opacity: 0.2;
  background: #ffa975;
  content: "";
}
.page-container .nav-select {
  position: absolute;
  z-index: 10;
  margin-left: 0.25rem;
  width: 7rem;
  box-sizing: border-box;
  padding: 0 0.2rem;
  background: #fff;
  box-shadow: 0 0.06rem 0.18rem 0 rgba(0,0,0,0.3);
  border-radius: 0.16rem;
  font-size: 0;
}
.page-container .nav-select:before {
  position: absolute;
  display: block;
  bottom: 100%;
  right: 0.58rem;
  border: 0.1rem solid rgba(0,0,0,0);
  border-bottom-color: #fff;
  content: "";
}
.page-container .nav-select li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.2rem;
  box-sizing: border-box;
  width: 1.8rem;
  height: 0.64rem;
  background: #f7f7f7;
  border-radius: 0.32rem;
  font-size: 0.26rem;
  font-family: PingFang SC;
  font-weight: 500;
  color: #333;
  text-align: center;
  cursor: pointer;
}
.page-container .nav-select li.active {
  border: 2px solid #f0431a;
  color: #f0431a;
  cursor: default;
}
.page-container .strategy-container {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background: #518c39;
}
.page-container .strategy-container .strategy-box {
  position: relative;
  height: 100%;
}
.page-container .strategy-container .img-box {
  height: 100%;
  overflow-y: auto;
}
.page-container .strategy-container .btn-back {
  position: absolute;
  width: 1.48rem;
  height: 0.56rem;
  left: 0;
  top: 0.56rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 0 0.24rem 0 rgba(56,117,31,0.6);
  border-radius: 0 0.28rem 0.28rem 0;
  font-size: 0.28rem;
  font-family: PingFang SC;
  font-weight: 500;
  color: #333;
  cursor: pointer;
}
.page-container .strategy-container .btn-back .iconfont {
  display: inline-block;
  font-size: 0.28rem;
  transform: rotate(-90deg);
  margin-right: 0.14rem;
}
.page-container .strategy-container img {
  display: block;
}
.page-container .list-item-loading {
  text-align: center;
  padding: 0.2rem 0 0.4rem;
  color: #fff;
  font-size: 0.24rem;
  letter-spacing: 0.01rem;
}
.page-container .footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 1.3rem;
  background: #46812e;
  font-size: 0;
}
.page-container .footer > div {
  cursor: pointer;
  width: 3.4rem;
}
</style><template id="c-loading">
  <!-- 加载效果 -->
  <div class="free-loading">
    <div class="la-line-scale">
      <div></div>
      <div></div>
      <div></div>
      <div></div>
      <div></div>
    </div>
    <p>数据加载中...</p>
  </div>
</template>
<script>
Vue.component("loading", {
  template: "#c-loading"
});
</script>
<template id="list-item">
  <div class="item-card">
    <div class="card-left">
      <img v-if="item.itempic" v-lazy="item.itempic">
      <img v-else src="http://img.bc.fqapps.com/fudai13cae4ae6ef16739ed3b100a2ec39e97.gif" alt="">
    </div>
    <div class="card-right">
      <div class="row-1">
        <div class="title">
          <img
            class="icon"
            src="http://img-haodanku-com.cdn.fudaiapp.com/Fswyzm7oIZGLInzaidPkrMXWEbqx"
            alt="">
          <span>{{ item.itemshorttitle || item.itemtitle }}</span>
        </div>
        <div class="desc-with-sales">
          <div v-if="NavTypes.kaiQiang !== type" class="desc">
            <i class="iconfont hdk-huo"></i>近2小时售出{{item.itemsale2}}件
          </div>
          <div v-else class="desc">
            <i class="iconfont hdk-naozhong"></i>{{startDate}}
          </div>
          <div class="today-sale">日销 {{item.todaysale}}</div>
        </div>
      </div>
      <div class="row-2">
        <div class="price">
          <span>券后价</span><strong>￥{{ Number(item.itemendprice) }}</strong>
          <span class="origin-price">￥{{ item.itemprice }}</span>
        </div>
        <div class="coupon-row">
          <div class="coupon" v-if="item.couponmoney != 0">
            <span class="name">券</span><span
            class="value">￥{{ type !== "jd" ? item.couponmoney : item.coupon_amount }}</span>
          </div>
        </div>
      </div>
    </div>
    <div class="btn-block">
      <div class="btn to-order" v-on:click="clickOrder"><span>立即下单</span></div>
    </div>
  </div>
</template>
<script>
Vue.component("list-item", {
  template: "#list-item",
  props: {
    item: Object,
    type: {
      type: Number,
    },
    showShare: {
      type: Boolean,
      default: false
    }
  },
  data: function() {
    return {
      NavTypes: NavTypes
    };
  },
  computed: {
    startDate: function() {
      // 今日{{item.couponstarttime}}点开抢
      var date = new Date(this.item.couponstarttime * 1000);
      var now = new Date();

      var str = date.format("hh:mm") + "开抢";

      var diff = Number(date.format("MMdd")) - Number(now.format("MMdd"));
      switch(diff) {
        case 2:
          str = "后天" + str;
          break;
        case 1:
          str = "明天" + str;
          break;
        case 0:
          str = "今天" + str;
          break;
        case -1:
          str = "昨天" + str;
          break;
        case -2:
          str = "前天" + str;
          break;
        default:
          str = date.format("M月dd日") + str;
      }
      return str;
    }
  },
  methods: {
    clickGetCoupon: function() {
      this.$emit("coupon");
    },
    clickOrder: function() {
      this.$emit("order");
    }
  }
});
</script>
<template id="c-list-item-1-yuan">
  <div class="item-card-1-yuan">
    <div class="img-box">
      <img v-lazy="item.itempic">
    </div>
    <div class="text-block">
      <div class="title ellipsis-single">{{item.itemshorttitle}}</div>
      <div class="bottom">
        <div class="price">
          <span>券后价</span><strong>￥{{ Number(item.itemendprice) }}</strong>
        </div>
        <div class="btn to-order" v-on:click="clickOrder"><span>立即下单</span></div>
      </div>
    </div>
  </div>
</template>
<script>
Vue.component("list-item-1-yuan", {
  template: "#c-list-item-1-yuan",
  props: {
    item: Object,
  },
  methods: {
    clickOrder: function() {
      this.$emit("order");
    }
  }
});
</script>
<div class="page-container" id="single-page-app" v-cloak><div class="strategy-container" v-show="strategyVisible"><div class="strategy-box max-width"><div class="btn-back" v-on:click="hideStrategy"><i class="iconfont hdk-paixu"></i><span>返回</span></div><div class="img-box"><img src="http://img-haodanku-com.cdn.fudaiapp.com/FlGvfFWTrTPdezAWbxLg4eeHFhPA"></div></div></div><div class="banner-wrapper"><img class="free-banner" v-bind:src="config.banner" alt=""></div><div class="strategy"><img v-on:click="showStrategy" src="http://img-haodanku-com.cdn.fudaiapp.com/FhmOLnWq4eH7OcqJHw_AqFtjyZS2"></div><div class="fixed-nav" ref="nav" v-bind:class="{fixed: navFixed}"><ul class="nav-list"><li class="active-bg" v-bind:style="{left:(config.activeNavIndex / config.nav.length * 100) + '%', width:(1 / config.nav.length * 100) + '%'}"></li><li class="nav-item" v-for="(item, index) in config.nav" v-bind:class="{active: index === config.activeNavIndex}" v-on:click="handleNavBar(item,index)"><span>{{item.name}}</span></li></ul></div><div class="page-content"><div class="nav-child" v-if="activeNav.child"><!-- 二级nav--><ul class="second-nav"><li v-for="(it, index) in activeNav.child.children" v-bind:class="{active:activeNav.child.value.sortIndex === index}" v-on:click="clickSecondNav(it, index)"><span v-if="it.type === 'sort'">{{it.name}}</span><span v-else>{{activeOption.label}}</span><i class="iconfont hdk-paixu2 arrow" v-if="it.type === 'sort'" v-bind:class="{up:activeNav.child.isReverse &amp;&amp; activeNav.child.value.sortIndex === index}"></i><div class="all-icon" v-else><img src="http://img-haodanku-com.cdn.fudaiapp.com/FskWB1p_2W_nxOuaBb5PjhQqv01U"></div></li></ul><!-- 商品类型--><ul class="nav-select" v-if="activeNav.child.options" v-show="config.showSecondSelect"><li v-for="(it, index) in activeNav.child.options" v-bind:class="{active:index === activeNav.child.value.typeIndex}" v-on:click="clickNavSelect(it, index)"><span>{{it.label}}</span></li></ul></div><div class="free-lists"><template v-if="listData.list.length || listData.finished"><template v-if="activeNav.value !== NavTypes.yiYuan"><list-item v-for="(item,index) in listData.list" v-bind:item="item" v-bind:type="activeNav.value" v-bind:key="index" v-on:buy="handleGoodsTransfer" v-on:coupon="onClickGetCoupon(item)" v-on:order="onClickOrder(item)"></list-item></template><template v-else><list-item-1-yuan v-for="(item, index) in listData.list" v-bind:item="item" v-bind:key="index" v-on:order="onClickOrder(item)"></list-item-1-yuan></template><!-- 底部提示 --><div class="list-item-loading"><span v-if="listData.finished">没有更多商品了~</span><span v-else>数据正在赶来的路上...</span></div></template><!-- 加载效果 --><loading v-else-if="!listData.list.length && listData.loading"></loading></div></div><div class="footer max-width"><div class="link" v-on:click="handleThroughLink"><img src="http://img-haodanku-com.cdn.fudaiapp.com/Fov7x6RVJYVgOY2vQprsXgun-80z"></div><div class="share" v-on:click="handleShare"><img src="http://img-haodanku-com.cdn.fudaiapp.com/FoWBJko_pT2Jz-0dEhDJduAdc5wL"></div></div></div><script>Vue.use(vant.Lazyload, {
  preLoad: 1.3,
  error: "http://img.bc.haodanku.com/haodanku/1595237918",
  loading: "http://img.bc.fqapps.com/fudai13cae4ae6ef16739ed3b100a2ec39e97.gif",
  attempt: 1
});

var listDataStr = JSON.stringify({
  list: [],
  loading: false,
  finished: false,
  min_id: 1,
  pageTotal: 1,
  pageCurrent: 0
});
var baseMixin = {
  el: "#single-page-app",
  data: function() {
    return {
      listData: JSON.parse(listDataStr)
    };
  },
  created: function() {
    this.getListData();
  },
  mounted: function() {
    var that = this;
    window.addEventListener("scroll", function(ev) {
      if(isScrollEnd(this, "vertical", 40)) {
        that.getListData();
      }
    });
  },
  methods: {
    resetListData: function() {
      this.listData = JSON.parse(listDataStr);
    },
    getListDataParams: function(item) {
      throw new Error("需要使用了该mixins的组件实现listDataParams函数");
    },
    getListData: function() {
      throw new Error("需要使用了该mixins的组件实现getListData函数");
    },
    getTransferParams: function() {
      throw new Error("需要使用了该mixins的组件实现transferParams函数");
    },
    handleGoodsTransfer: function() {
      throw new Error("需要使用了该mixins的组件实现handleGoodsTransfer函数");
    },
    /**
     * 分享给好友
     */
    handleShare: function() {
      copy(location.href, "复制成功，分享给身边好友吧~");
    },
  }
};var navList = [
  {"label": "全部", "value": "0"},
  {"label": "女装", "value": "1"},
  {"label": "男装", "value": "2"},
  {"label": "内衣", "value": "3"},
  {"label": "美妆", "value": "4"},
  {"label": "配饰", "value": "5"},
  {"label": "鞋品", "value": "6"},
  {"label": "箱包", "value": "7"},
  {"label": "儿童", "value": "8"},
  {"label": "母婴", "value": "9"},
  {"label": "居家", "value": "10"},
  {"label": "美食", "value": "11"},
  {"label": "数码", "value": "12"},
  {"label": "家电", "value": "13"},
  {"label": "其他", "value": "14"},
  {"label": "车品", "value": "15"},
  {"label": "文体", "value": "16"},
  {"label": "宠物", "value": "17"}
];var NavTypes = {
  baoYou: 1,
  reXiao: 2,
  kaiQiang: 3,
  yiYuan: 4,
};
var indexMixin = (function() {
  var that;
  var navChildOrigin = {
    type: "nav",
    value: {
      sortIndex: 0,
      typeIndex: 0
    },
    isReverse: false,
    options: navList,
    children: [
      {
        type: "sort",
        name: "热销",
        value: "3",
        reverseValue: "4"
      },
      {
        type: "sort",
        name: "券后价",
        value: "2",
        reverseValue: "1"
      },
      {
        type: "select",
        name: "全部",
        value: navList[0].value,
      },
    ]
  };
  var navChildStr = JSON.stringify(navChildOrigin);
  return {
    mixins: [baseMixin],
    data: function() {
      return {
        NavTypes: NavTypes,
        strategyVisible: false,
        rules: [],
        navFixed: false,
        config: {
          banner: "http://img-haodanku-com.cdn.fudaiapp.com/FnEEQOKEIMq2yY2FrlBT1RKQ2r_j",
          activeNavIndex: 0,
          nav: [
            {
              name: "低价包邮",
              value: NavTypes.baoYou,
              child: JSON.parse(navChildStr)
            },
            {
              name: "猫超热销",
              value: NavTypes.reXiao,
              child: JSON.parse(navChildStr)
            },
            {
              name: "即将开抢",
              value: NavTypes.kaiQiang,
              child: JSON.parse(navChildStr)
            },
            {
              name: "一元购",
              value: NavTypes.yiYuan,
            },
          ],
          showSecondSelect: false,
        },
        acticity: {}
      };
    },
    mounted: function() {
      that = this;
      setTimeout(function() {
        isFixed(that.$refs.nav, function(fixed) {
          that.navFixed = fixed;
        });
      }, 500);
    },
    computed: {
      activeNav: function() {
        return this.config.nav[this.config.activeNavIndex];
      },
      activeSecondNav: function() {
        var child = this.activeNav.child;
        return child.children[child.value.sortIndex];
      },
      activeOption: function() {
        var child = this.activeNav.child;
        return child.options[child.value.typeIndex];
      }
    },
    methods: {
      /**
       * 切换导航栏
       */
      handleNavBar: function(item, index) {
        if(this.config.activeNavIndex === index) return;
        this.config.activeNavIndex = index;
        var abort = this.getListDataAbort;
        if(abort) {
          this.getListDataAbort = null;
          abort().complete(function() {
            that.reGetListData();
          });
          return;
        }
        this.reGetListData();
      },
      reGetListData: function() {
        this.resetListData();
        this.getListData();
      },
      /**
       * 获取商品数据
       */
      getListData: function() {
        if(this.listData.loading || this.listData.finished) return;
        this.listData.loading = true;
        var params = {
          type: this.activeNav.value,
          p: ++this.listData.pageCurrent,
          order: "",
          cat_id: ""
        };
        if(this.activeNav.child) {
          params.order = this.activeNav.child.isReverse ? this.activeSecondNav.reverseValue : this.activeSecondNav.value;
          params.cat_id = this.activeOption.value;
        }
        var obj = Request.get(
          url("api.haodanku.com/api/maochao_items"),
          Object.assign(params, this.getListDataParams())
        );
        this.getListDataAbort = obj.ajax.abort.bind(obj.ajax);
        obj.promise.then(function(res) {
          setTimeout(function() {
            var list = res.data.data || [];
            that.listData.list = that.listData.list.concat(list);
            that.listData.pageTotal = res.data.page_all || 1;
            that.acticity = res.data.acticity;
            that.listData.loading = false;
            that.listData.finished = !list.length || (that.listData.pageTotal <= that.listData.pageCurrent);
          }, 200);
        }).catch(function(e) {
          if(e.statusText === "abort") return;
          that.listData.finished = true;
          that.listData.loading = false;
        });

      },
      /**
       * 商品转链
       */
      handleGoodsTransfer: function(item) {
        var msg = "复制淘口令成功，请打开淘宝领取";
        if(item.taoCode) {
          copy(item.taoCode, msg);
          return;
        }
        Request.postSync(
          this.transferParamsUrl,
          Object.assign({
            itemid: item.itemid,
            activityid: item.activityid,
            title: item.itemshorttitle || item.itemtitle,
            domain: location.host,
          }, this.getTransferParams(item)),
          function(res) {
            item.taoCode = res.data.new_model || res.data;
            copy(item.taoCode, msg);
          }
        ).promise.catch(function(res) {
          toast(res.msg || "获取淘口令失败");
        });

      },
      onClickOrder: function(item) {
        this.handleGoodsTransfer(item);
      },
      clickSecondNav: function(item, index) {
        if(item.type === 'sort') {
          var parent = this.activeNav.child;
          var isSame = parent.value.sortIndex === index;
          parent.value.sortIndex = index;
          if(isSame) {
            parent.isReverse = !parent.isReverse;
          } else {
            parent.isReverse = false;
          }
          this.reGetListData();
          return;
        }
        this.config.showSecondSelect = true;
        window.addEventListener("click", function() {
          that.config.showSecondSelect = false;
          window.removeEventListener("click", arguments.callee, true);
        }, true);
      },
      clickNavSelect: function(item, index) {
        var parent = this.activeNav.child;
        parent.value.typeIndex = index;
        this.config.showSecondSelect = false;
        this.reGetListData();
      },
      hideStrategy: function() {
        this.strategyVisible = false;
        this.noScrollCancel && this.noScrollCancel();
      },
      showStrategy: function() {
        this.strategyVisible = true;
        this.noScrollCancel = noScroll();
      },

    }
  };
})();
</script><script>// 工具函数v1.0.1

/**
 * @param msg {string}
 * @param time {number?}
 */
function toast(msg, time) {

  vant.Toast({
    type: "text",
    message: msg,
    duration: time === undefined ? 3500 : time
  });
}

/**
 * 判断是否已滚动到底部
 * @param el {HTMLElement}
 * @param direct {"vertical"|"horizontal"?}
 * @param offset {number?}
 * @returns {boolean}
 */
function isScrollEnd(el, direct, offset) {
  if(direct === void 0) {
    direct = "vertical";
  }
  if(offset === void 0) {
    offset = 10;
  }
  var scrollTop = el.scrollTop;
  var scrollLeft = el.scrollLeft;
  var scrollHeight = el.scrollHeight;
  var scrollWidth = el.scrollWidth;
  var width = el.clientWidth;
  var height = el.clientHeight;
  if(el === window) {
    scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
    scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
    scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
    scrollWidth = document.documentElement.scrollWidth || document.body.scrollWidth;
    width = document.documentElement.clientWidth || document.body.clientWidth;
    height = document.documentElement.clientHeight || document.body.clientHeight;
  }
  if(direct === "vertical") {
    return scrollTop >= scrollHeight - height - offset;
  } else {
    return scrollLeft >= scrollWidth - width - offset;
  }
}

/**
 * 判断是否是dom
 * @param target {any}
 */
var isDom = (function() {
  return (typeof HTMLElement === "object") ?
    function(target) {
      return target instanceof HTMLElement;
    } :
    function(target) {
      return target && typeof target === "object" && target.nodeType === 1 && typeof target.nodeName === "string";
    };
})();

/**
 * 手动添加img标签下载图片
 * @param url {string}
 * @returns {Promise}
 */
function loadImg(url) {
  return new Promise(function(resolve, reject) {
    var img = document.createElement("img");
    var parent = document.body;
    img.style.display = "none";
    img.onload = function(ev) {
      parent.removeChild(img);
      resolve();
    };
    img.onabort = img.onerror = function(ev) {
      parent.removeChild(img);
      reject(ev);
    };
    img.src = url;
    parent.append(img);
  });
}

/**
 * 选中html
 * @param element {HTMLElement}
 * @return {string}
 */
function select(element) {
  var selectedText;
  if(element.nodeName === "SELECT") {
    element.focus();
    selectedText = element.value;
  } else if(element.nodeName === "INPUT" || element.nodeName === "TEXTAREA") {
    var isReadOnly = element.hasAttribute("readonly");
    if(!isReadOnly) {
      element.setAttribute("readonly", "");
    }
    element.select();
    element.setSelectionRange(0, element.value.length);
    if(!isReadOnly) {
      element.removeAttribute("readonly");
    }
    selectedText = element.value;
  } else {
    if(element.hasAttribute("contenteditable")) {
      element.focus();
    }
    var selection = window.getSelection();
    var range = document.createRange();
    range.selectNodeContents(element);
    selection.removeAllRanges();
    selection.addRange(range);
    selectedText = selection.toString();
  }
  return selectedText;
}

/**
 * 复制文字或html
 * @param element {HTMLElement | string}
 * @param successMsg {string?}
 * @param errorMsg {string?}
 * @param isFromCopy {boolean?}
 * @return {Promise}
 */
function copy(element, successMsg, errorMsg, isFromCopy) {
  var isText = typeof element === "string";
  if(isText) {
    var text = element;
    element = document.createElement("div");
    element.innerText = text;
    element.style.position = "fixed";
    element.style.left = "-100000px";
    document.body.appendChild(element);
  }
  var p = new Promise(function(resolve, reject) {
    select(element);
    var succeeded;
    try {
      succeeded = document.execCommand("copy");
    } catch(err) {
      console.log(err);
      succeeded = false;
    }
    if(succeeded) {
      toast(successMsg || "复制成功!");
      resolve();
      return;
    }
    if(isFromCopy) {
      toast(errorMsg || "复制失败，请稍后重试!");
      reject();
      return;
    }
    vant.Dialog.alert({
      message: '点击复制',
      confirmButtonText: "复制",
      theme: 'round-button'
    }).then(function() {
      copy(element, successMsg, errorMsg, true).then(resolve, reject);
    });

  });
  p.finally(function() {
    window.getSelection().removeAllRanges();
    if(isText) {
      document.body.removeChild(element);
    }
  });
  return p;
}

/**
 * 判断是否固定在顶部的条件
 * @param target {HTMLElement}
 * @param cb {Function}
 * @param container {HTMLElement?}
 * @param top {number?}
 * @return {function(): void}
 */
function isFixed(target, cb, top, container) {
  var wrapper = container || window;

  var getScrollTop = wrapper === window ? function() {
    return document.documentElement.scrollTop || document.body.scrollTop;
  } : function() {
    return wrapper.scrollTop;
  };

  var rect = target.getBoundingClientRect();
  var distanceTop = rect.top + getScrollTop() - (top || 0);
  var handler;
  cb(getScrollTop() >= distanceTop);
  wrapper.addEventListener("scroll", handler = function() {
    // 当滑动距离大于等于分类距离顶部位置时，则固定定位
    cb(getScrollTop() >= distanceTop);
  });
  return function() {
    wrapper.removeEventListener("scroll", handler);
  };
}

/**
 * 从object里挑选出pickKeys中包含的key的object
 * @param originObj {object}
 * @param pickKeys {array}
 * @param cb {function?}
 * @returns {object}
 */
function pickByKeys(originObj, pickKeys, cb) {
  var callback = cb || function(v) {
    return v;
  };
  return pickKeys.reduce(function(res, key) {
    if(originObj.hasOwnProperty(key)) res[key] = callback(originObj[key], key, originObj);
    return res;
  }, {});
}

/**
 * 从object里挑选出renamePickObj中包含的key的object并重命名
 * @param originObj {object}
 * @param renamePickObj {object}
 * @param cb {function?}
 * @returns {object}
 */
function pickRename(originObj, renamePickObj, cb) {
  var callback = cb || function(v) {
    return v;
  };
  var renames = Object.keys(renamePickObj);
  return renames.reduce(function(result, rename) {
    var pick = renamePickObj[rename];
    if(originObj.hasOwnProperty(pick)) {
      result[rename] = callback(originObj[pick], pick, originObj);
    }
    return result;
  }, {});
}

/**
 * 禁止滚动
 * @param scrollContainer {Window | HTMLElement | string | undefined}
 * @return function
 */
function noScroll(scrollContainer) {
  scrollContainer = scrollContainer || window;
  var target = scrollContainer;
  if(typeof scrollContainer === 'string') {
    target = document.querySelector(scrollContainer);
    if(!target) throw new TypeError();
  } else if(scrollContainer === window) {
    if(document.documentElement.scrollTop) {
      target = document.documentElement;
    } else {
      target = document.body;
    }
  }
  var last = pickByKeys(target.style, ["marginTop", "overflow"]);
  var scrollTop = target.scrollTop;
  target.scrollTop = 0;
  target.style.overflow = "hidden";
  target.style.marginTop = -scrollTop + "px";
  return function() {
    target.scrollTop = scrollTop;
    Object.assign(target.style, last);
  };
}

/**
 * 获取数据类型
 * @param target {any}
 * @return {string|"array"|"undefined"|"boolean"|"number"|"string"|"function"|"symbol"|"bigint"}
 */
function typeOf(target) {
  var tp = typeof target;
  if(tp !== 'object')
    return tp;
  return Object.prototype.toString.call(target).slice(8, -1).toLowerCase();
}

/**
 * 解析url search部分
 * @param url {string?} url必须带?
 * @return {{}}
 */
function parseSearch(url) {
  var searchStr = url || location.href;
  var result = {};
  // 去除?号前的
  searchStr = searchStr.split("?")[1];
  if(!searchStr) return result;
  // 去掉hash
  searchStr = searchStr.split("#")[0];
  this.queryStr = searchStr;
  var params = searchStr.split("&");
  for(var k in params) {
    var v = params[k];
    var _a = v.split("=").map(function(item) {
      return decodeURIComponent(item);
    }), key = _a[0], value = _a[1];
    key = key.replace(/\[\w*\]/g, "");
    var resultValue = result[key];
    switch(typeOf(resultValue)) {
      case 'undefined':
        result[key] = value;
        break;
      case "array":
        result[key].push(value);
        break;
      default:
        result[key] = [resultValue, value];
    }
  }
  return result;
}

parseSearch.current = parseSearch();

/**
 *
 * @param method {"get"|"post"}
 * @param url {string}
 * @param data {object?}
 * @param callback {function?}
 * @param others {object?}
 * @returns {{ajax:any,promise:Promise}}
 */
function Request(method, url, data, callback, others) {
  var ajax;
  var promise = new Promise(function(resolve, reject) {
    var param = {
      url: url,
      type: method,
      data: data,
      dataType: 'json',
      timeout: 10000,
      success: function(res) {
        if(Request.successCodes.indexOf(Number(res.code)) > -1) {
          callback && callback(res);
          resolve(res);
        } else {
          toast(res.msg);
          reject(res);
        }
      },
      error: function(e) {
        if(e.statusText !== "abort") {
          toast('网络错误，请检查网络重试');
        }
        reject(e);
      }
    };
    ajax = $.ajax(Object.assign({}, param, others));
  });
  return {ajax: ajax, promise: promise};
}

Request.successCodes = [200, 1];
/**
 * @param url {string}
 * @param data {object?}
 * @returns {{ajax:any,promise:Promise}}
 */
Request.get = function(url, data) {
  return Request("get", url, data);
};
/**
 * @param url {string}
 * @param callback {function}
 * @param data {object}
 * @returns {{ajax:any,promise:Promise}}
 */
Request.getSync = function(url, data, callback) {
  return Request("get", url, data, callback, {async: false});
};

/**
 * @param url {string}
 * @param data {object?}
 * @returns {{ajax:any,promise:Promise}}
 */
Request.post = function(url, data) {
  return Request("post", url, data);
};
/**
 * @param url {string}
 * @param data {object}
 * @param callback {function}
 * @returns {{ajax:any, promise:Promise}}
 */
Request.postSync = function(url, data, callback) {
  return Request("post", url, data, callback, {async: false});
};

var protocol = (function() {
  var protocol = window.location.protocol;
  protocol = protocol.substring(0, protocol.length - 1);
  return protocol.includes("http") ? protocol : "http";
})();

/**
 * @param url {string}
 * @return {string}
 */
function url(url) {
  return protocol + "://" + url;
}

/**
 * 格式化日期  到date原型上用 不能import导入调用 或者用call apply
 * @param format {string?}
 * @returns string
 */
function formatDate(format) {
  if(!format) format = 'yyyy-MM-dd hh:mm:ss';
  var o = {
    'M+': this.getMonth() + 1, //月份
    'd+': this.getDate(), //日
    'h+': this.getHours(), //小时
    'm+': this.getMinutes(), //分
    's+': this.getSeconds() //秒
  };
  if(/(y+)/.test(format)) {
    format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
  }
  for(var k in o) {
    if(new RegExp('(' + k + ')').test(format)) {
      var s1 = RegExp.$1;
      var v = o[k];
      var value = s1.length === 1 ? v : ('00' + v).substr(String(v).length);
      format = format.replace(s1, value);
    }
  }
  return format;
}

Date.prototype.format = formatDate;

// 给不能用``模板字符串的环境使用
// es5的格式化字符串 example: getFormatStr("11%s111%s", 3, 4) => "1131114"
function getFormatStr() {
  // es5; typescript不需要str, ...params参数
  var args = Array.prototype.slice.call(arguments, 0);
  if(!args.length) return "";
  var str = args[0];
  var params = args.slice(1);
  return str.replace(/%s/g, function() {
    return params.length ? params.shift() : "";
  });
}

var elementStyle = document.createElement('div').style;
var vendor = (function() {
  var transformName = {
    webkit: 'webkitTransform',
    Moz: 'MozTransform',
    O: 'OTransform',
    ms: 'msTransform',
    standard: 'transform'
  };
  for(var key in transformName) {
    if(elementStyle[transformName[key]] !== undefined) {
      return key;
    }
  }
  return false;
})();

/**
 * 判断是什么种类的浏览器并返回拼接前缀后的数据
 * @param style {string}
 * @returns {string | boolean}
 */
function prefixStyle(style) {
  if(vendor === false) {
    return false;
  }
  if(vendor === 'transform') {
    return style;
  }
  return vendor + style.charAt(0).toUpperCase() + style.substr(1);
}

/**
 * 判断是否支持css
 * @param key {string}
 * @param value {string}
 * @returns {boolean}
 */
function cssSupport(key, value) {
  if(key in elementStyle) {
    elementStyle[key] = value;
    return elementStyle[key] === value;
  } else {
    return false;
  }
}

var cancelHandleObj = {};
var sticky = {
  /**
   * @param el {HTMLElement}
   * @param binding {object}
   * @param vnode {object}
   */
  unbind: function(el, binding, vnode) {
    var cancel = cancelHandleObj[vnode.key];
    if(!cancel) return;
    cancel();
    delete cancelHandleObj[vnode.key];
  },
  /**
   * @param el {HTMLElement}
   * @param binding {object}
   * @param vnode {object}
   */
  inserted: function(el, binding, vnode) {
    if(vnode.key === undefined) throw new Error("sticky key required");
    var types = {
      auto: "auto",
      fixed: "fixed",
      sticky: "sticky"
    };
    var value = typeOf(binding.value) === "object" ? binding.value : {};

    var params = Object.assign({
      scrollEl: "", // 不传时默认window
      type: types.auto, // 指定使用 sticky | fixed | auto  // 通常指定使用fixed
      fixedClass: "fixed", // fixed模式时fixed的class名
      top: 0,
      zIndex: 1
    }, value);

    var $el = $(el);
    var oldStyle = pickByKeys(el.style, ["position", "z-index", "top"]);

    function reset() {
      Object.assign(el.style, oldStyle);
    }

    function useFixed() {
      var cancelFn = isFixed(el, function(fixed) {
        if(fixed) {
          if(!$el.hasClass(params.fixedClass)) {
            $el.addClass(params.fixedClass);
            Object.assign(el.style, {
              top: params.top + "px",
              "z-index": params.zIndex,
              position: params.type
            });
          }
        } else {
          if($el.hasClass(params.fixedClass)) {
            $el.removeClass(params.fixedClass);
            reset();
          }
        }
      }, params.top, params.scrollEl ? document.querySelector(params.scrollEl) : undefined);
      cancelHandleObj[vnode.key] = function() {
        cancelFn();
        reset();
      };
    }

    function useSticky() {
      Object.assign(el.style, {
        top: params.top + "px",
        "z-index": params.zIndex,
        position: types.sticky
      });
    }

    var support = cssSupport("position", types.sticky);
    switch(params.type) {
      case types.auto:
        support ? useSticky() : useFixed();
        break;
      case types.sticky:
        useSticky();
        break;
      case types.fixed:
        useFixed();
        break;
      default:
        return;
    }
  }
};
</script><script>new Vue({
  mixins: [indexMixin],
  data: function() {
    return {
      transferParamsUrl: url("v2.api.haodanku.com/ratesurl"), // 转链链接
    }
  },
  methods: {
    // 公共参数
    commonParams: function() {
      return {
        apikey: 'sylar', //---必填
        tb_name:'tb370655212', //---必填
        pid:'mm_1520060136_2232550319_111181400478',     //---必填
        relation_id: "",
      }
    },
    getListDataParams: function() {
      return {apikey: this.commonParams().apikey}
    },
    getTransferParams: function(item) {
      return Object.assign(this.commonParams(), {get_taoword: 1})
    },
    // 猫超直达
    handleThroughLink: function() {
      Request.postSync(
        url("v2.api.haodanku.com/createConference_code"),
        Object.assign(this.commonParams(), this.acticity),
        function(res) {
          copy("0" + res.data.tao_code + "/", "复制淘口令成功，请打开淘宝领取");
        }
      ).promise.catch(function(res) {
        toast(res.msg || "获取淘口令失败");
      });
    }
  }
})</script></body></html>